import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/home/home.vue'
import cartView from '@/views/home/cart.vue'
import claView from '@/views/home/cla.vue'
import indexView from '@/views/home/index.vue'
import myView from '@/views/home/my.vue'
import ss from '@/views/ss.vue'
import xq from '@/views/xq.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path: '',redirect: '/home/index',},
    {
      path: '/home',
      name: 'home',
      component: HomeView,
      children:[
        {path: 'cart',name: 'cart',component: cartView,},
        {path: 'cla',name: 'cla',component: claView,},
        {path: 'index',name: 'index',component: indexView,},
        {path: 'my',name: 'my',component: myView,},
      ]
    },
    {path: 'ss',name: 'ss',component: ss,},
    {path: 'xq',name: 'xq',component: xq,},
  ],
})

export default router
